﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="roleManage.aspx.cs" Inherits="Manage_roleManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link rel="Stylesheet" type="text/css" href="css/admin.css" />

    <script type="text/javascript" src="js/jquery-1.7.1.js"></script>
    <link rel="Stylesheet" type="text/css" href="ueditor/themes/default/ueditor.css" />
    
    <style type="text/css">
        .inputfoucs
        {
            font-size: 12px;
            padding: 3px;
            border: 1px solid #f7ca06;
            background: #fffbca;
            color: #cb6a24;
        }
        .inputblur
        {
            font-size: 12px;
            padding: 3px;
            background: #f8f9ff;
            border: 1px solid #c4c9fd;
            color: #6C63A3;
        }
    </style>
    <script type="text/javascript">

        $(function() {
            $("#btn_AddRole").click(function() {
                if ($("#txt_roleName").val() == "") {
                    alert("请输入角色名称！");
                    $("#txt_roleName").addClass("inputfoucs");
                    $("#txt_roleName").focus();
                    return false;
                }
            });
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        
        <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
            <tr height="28">
                <td background="images/title_bg1.jpg">
                    当前位置:
                    <asp:SiteMapPath ID="SiteMapPath1" runat="server" SiteMapProvider="ManageSiteMapProvider">
                    </asp:SiteMapPath>
                </td>
            </tr>
            <tr>
                <td bgcolor="#b1ceef" height="1">
                </td>
            </tr>
            <tr height="20">
                <td background="images/shadow_bg.jpg">
                </td>
            </tr>
        </table>
        
        <div style="margin-left:10px;margin-right:10px">
            
            <table cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
                <tr height="1">
                    <td>
                    </td>
                </tr>
                <tr height="22">
                    <td style="padding-left: 20px; font-weight: bold; color: #ffffff" align="left" background="images/title_bg2.jpg">
                        角色设置
                    </td>
                </tr>
                <tr bgcolor="#ecf4fc" height="12">
                    <td>
                    </td>
                </tr>
                <tr height="5">
                    <td>
                    </td>
                </tr>
            </table>
           
            <div style="width:300px;float:left">
                <asp:GridView ID="RoleList" runat="server" AutoGenerateColumns="False" 
                    CellPadding="4" ForeColor="#333333" GridLines="None" 
                    onselectedindexchanged="RoleList_SelectedIndexChanged">
                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
                    <Columns>
                        <asp:TemplateField>
                            
                            <ItemTemplate>
                                <%--<asp:Label ID="lb_RoleId" runat="server" Text='<%# Bind("roleId") %>'></asp:Label>--%>
                                <span style="display:none" runat="server"><asp:Label ID="lb_RoleId" runat="server" Text='<%# Bind("roleId") %>'></asp:Label></span>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField DataField="roleName" HeaderText="所有角色">
                        <HeaderStyle Width="150px" />
                        </asp:BoundField>
                        <asp:CommandField ShowSelectButton="True" />
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                        HorizontalAlign="Left" />
                    <EditRowStyle BackColor="#999999" />
                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                </asp:GridView>
            </div>
            <div style="width:200px;float:left;background-color:#f4f5f7;margin-top:20px;padding-left:20px;padding-top:15px;">
                <asp:Label ID="lb_SelectedRole" runat="server" Text="选择相应的角色" ForeColor="Blue" 
                    Font-Size="Larger"></asp:Label><br /><br />
                <asp:Button ID="btn_Add" runat="server" Text="新增角色" onclick="btn_Add_Click" />
                <asp:Button ID="btn_Del" runat="server" Text="删除" Enabled="False" 
                    onclick="btn_Del_Click" />
            </div>
            <div style="display:none;"><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label></div>
            
            <div style="height:150px;display:none;" runat="server" id="div_Add">
                <br /><br /><br /><br /><br /><br /><br /><br /><br />
                <div style="clear:left;margin-top:50px;margin-left:100px;background-color:#ecf5fc;padding-left:10px;padding-bottom:10px;padding-top:10px;width:350px;">
                    输入角色名称：<asp:TextBox ID="txt_roleName" runat="server"></asp:TextBox>
                    
                    &nbsp;&nbsp;&nbsp;
                    <asp:Button ID="btn_AddRole" runat="server" Text="添加" 
                        onclick="btn_AddRole_Click" />
                     <%--<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txt_roleName" SetFocusOnError="true" runat="server" ErrorMessage="请输入角色名称"></asp:RequiredFieldValidator>--%>
                </div>
            </div>
            
        </div>
        
    </div>
    </form>
</body>
</html>
